package com.wecan.base.BO;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wecan.base.enums.MessageContentType;
import com.wecan.base.enums.MessageType;
import com.wecan.base.enums.SystemMessageType;
import lombok.Data;

/**
 * @Author liuzhihao
 * @Date 2022.04.07
 * @Version ${version}
 * @Description ${description}
 */
@Data
public class SystemMessageBO<T extends SystemMessageContentBO> {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private SystemMessageType type;

    // 当系统消息为广播消息时，可以没有toUserId
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long toUserId;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private MessageType messageType;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private MessageContentType contentType;

    // 消息内容业务约定即可
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private T content;
}
